Shuue on Trajectories: a Simpliied Approach to the Sch Utzenberger Product and Related Operations
نویسندگان
چکیده
We investigate the problem of nding monoids that recognize languages of the form L1 T L2, where T is an arbitrary set of trajectories. Thereby, we describe two such methods: one based on the so called trajectories monoids and the other based on monoids of matrices. Many well-known operations such as catenation, bi-catenation, shu e, literal shu e and insertion are just particular instances of the operation T . Hence, our results o er a uniform treatment for classical methods, notably the Sch utzenberger product. We investigate some other related operations, too. TUCS Research Group Mathematical Structures of Computer Science 1 Preliminaries In this paper we investigate the problem of nding monoids that recognize languages of the form L1 T L2, where T is an arbitrary set of trajectories. The solution o ers a uniform method to nd monoids that recognize a number of operations with languages such as, for instance: catenation, bi-catenation, shu e, literal shu e, balanced literal shu e, insertion, etc. Also, we compare our solution with other well-known constructions, notably with the Sch utzenberger product. Some other operations with languages are considered, too. The operation of shu e on trajectories of words and languages was introduced in [3]. The operations considered below are de ned using the notion of the trajectory. A trajectory de nes the general strategy to switch from one word to another word when carrying out the shu e operation. The operation is extended to sets T of trajectories. Let be an alphabet. The set of all words over is denoted by . The empty word is denoted by . If w 2 , then jwj denotes the length of w and jwja denotes the number of occurrences of a in w, where a 2 . Note that j j = 0. If w 2 , then the set of all pre xes of w is Pref(w) = fx j xy = w for some y 2 g. Analogously, the set of all su xes of w is Suf(w) = fy j xy = w for some x 2 g. If A is a set, then the set of all subsets of A is denoted by P(A). The shu e operation, denoted by , is de ned recursively by: (ax by) = a(x by) [ b(ax y) and x = x = fxg; where x, y 2 and a, b 2 . Other operations with words and languages that we consider in this paper are:literal shu e, denoted by lit: if x; y 2 , x = x1x2 : : : xn, y = y1y2 : : : ym, where xi; yj 2 , 1 i n, 1 j m, then x lit y = x1y1x2y2 : : : xmymxm+1xm+2 : : : xn; if n > m; x1y1x2y2 : : : xnynyn+1yn+2 : : : ym; if n m; balanced literal shu e, denoted by blit: if x; y 2 , x = x1x2 : : : xn, y = y1y2 : : : ym, where xi; yj 2 , 1 i n, 1 j m, then x blit y = x1y1x2y2 : : : xnyn; if n = m; ;; if n 6= m; insertion, denoted by : x y = fx0yx00 j x0x00 = xg: 1 bi-catenation, denoted by : x y = fxy; yxg; anti-catenation, denoted by : x y = yx: All the above operations are extended in a natural way to operations with languages, i.e., if ./ is an operation with words, ./2 f ; ; lit; blit; ; ; g and L1, L2 are languages, then L1 ./ L2 = [ x2L1;y2L2 x ./ y: 2 Shu e on trajectories In this section we introduce the notions of the trajectory and shu e on trajectories. The shu e of two words has a natural geometrical interpretation related to lattice points in the plane (points with nonnegative integer coordinates) and with a certain \walk" in the plane de ned by each trajectory. Let V = fr; ug be the set of versors in the plane: r stands for the right direction, whereas u stands for the up direction. De nition 2.1 A trajectory is an element t, t 2 V . Let be an alphabet and let t be a trajectory, let d be a versor, d 2 V , and ; 2 . De nition 2.2 The shu e of with on the trajectory dt, denoted dt , is recursively de ned as follows: if = ax and = by, where a; b 2 and x; y 2 , then ax dt by = a(x t by); if d = r; b(ax t y); if d = u; if = ax and = , where a 2 and x 2 , then ax dt = a(x t ); if d = r; ;; if d = u; if = and = by, where b 2 and y 2 , then dt by = ;; if d = r; b( t y); if d = u: Finally, t = ; if t = ; ;; otherwise: 2 Comment. Note that if j j 6= jtjr or j j 6= jtju, then t = ;. Example 2.1 Let and be the words = a1a2a3a4a5a6a7a8, = b1b2b3b4b5 and assume that t = r3u2r3ururu. The shu e of with on the trajectory t is t = fa1a2a3b1b2a4a5a6b3a7b4a8b5g: The result has the following geometrical interpretation (see Figure 1): the trajectory t de nes a line starting in the origin and continuing one unit to the right or up, depending on t. In our case, rst there are three units right, then two units up, then three units right, etc. Assign on the Ox axis and on the Oy axis of the plane. Observe that the trajectory ends in the point with coordinates (8; 5) (denoted by E in Figure 1) that is exactly the upper right corner of the rectangle de ned by and , i.e., the rectangle OAEB in Figure 1. Hence, the result of the shu e of with on the trajectory t is nonempty. The result can be read following the line de ned by the trajectory t, that is, when being in a lattice point of the trajectory, with the trajectory going right, one should pick up the corresponding letter from , otherwise, if the trajectory is going up, then one should add to the result the corresponding letter from . Hence, the trajectory t de nes a line in the rectangle OAEB, on which one has \to walk" starting from the corner O, the origin, and ending in the corner E, the exit point. In each lattice point one has to follow one of the versors r or u, according to the de nition of t.Assume now that t0 is another trajectory, say t0 = ur5u3rur2: In Figure 1, the trajectory t0 is depicted by a much bolder line that the trajectory t. Observe that t0 = fb1a1a2a3a4a5b2b3b4a6b5a7a8g: Consider the set of trajectories, T = ft; t0g. The shu e of with on the set T of trajectories is T = fa1a2a3b1b2a4a5a6b3a7b4a8b5; b1a1a2a3a4a5b2b3b4a6b5a7a8g: 3 6 O x y a1 a2 t0 a3 a4 t a5 a6 a7 a8 A b1 b2 b3 b4 b5 B E Figure 1 Remark 2.1 Here we show that a number of operations with words and languages are particular cases of the operation of shu e on trajectories. 1. Assume that T = r u . It follows that T = , the catenation operation. 2. Let T be the set T = r u [ u r . In this case T = , i.e., it is the bi-catenation operation. 3. Consider T = u r and observe that T = , the anti-catenation operation. 4. Let T be the set T = fr; ug . Observe that T = , the shu e operation. 5. Assume that T = (ru) (r [ u ). Note that in this case T = lit, the literal shu e. 6. Consider T = (ru) and observe that T = blit, the balanced literal shu e. 7. De ne T = r u r and note that T = , the insertion operation. 4 3 The problem of recognition and trajectories monoids In this section we recall some general facts about languages recognized by monoids. Of a special interest is the case of languages of the form L1 T L2, where T is a set of trajectories. A monoid M1 is embedded in a monoid M2 i there exists an injective morphism from M1 to M2. A monoid M1 divides a monoid M2, denoted M1 < M2, i M1 is isomorphic with a quotient of a submonoid ofM2. Clearly, if M1 is embedded in M2, then M1 divides M2. The division relation is transitive. The unit element of a monoid is denoted by 1. If M is a monoid, then the set P(M) is a monoid with the multiplication de ned by AB = fxy j x 2 A; y 2 Bg, where A;B M . De nition 3.1 Let L be a language, L . A monoid M recognizes L i there exists a morphism ' : !M , a subset F of M , F M , such that L = ' 1(F ). For each language L, L , there exists a monoidM that recognizes L. An example of such a monoid is the syntactic monoid of L. The syntactictic congruence de ned by L is the congruence L on de ned as: x L y i for all ; 2 x 2 L i y 2 L; where x; y 2 . The syntactic monoid of L, denoted by ML, is the quotient monoid = L. One can easily verify that ML recognizes L. A monoid M recognizes L i ML divides M . If a monoid M1 recognizes L and if M1 divides M2, then M2 recognizes L, too. The following theorem goes back to Kleene: Theorem 3.1 A language L is regular i L is recognized by some nite monoid. Let L1; L2 be languages L1; L2 . Let M1;M2 be monoids, such that Mi recognizes Li, i = 1; 2. Assume that ./ is an operation with languages such that L1 ./ L2 . The following problem has been widely investigated: nd a function ./ such that the language L1 ./ L2 is recognized by ./(M1;M2). For more details on this problem, as well as for a large bibliography, the reader is referred to [1], [4], or more recently, [5]. 5 In the sequel we solve this problem for the operation T , where T is an arbitrary set of trajectories. The solution o ers a uniform method to nd monoids that recognize a large number of operations with languages. Also, we compare our solution with other well-known constructions, mainly with the Sch utzenberger product. It turns out that our solution leads in general to a smaller monoid than the Sch utzenberger product. (See the Comment after Corollary 4.1.) De nition 3.2 Let L1; L2 be languages, L1; L2 , and let M1;M2 be monoids such that Mi recognizes Li, i = 1; 2. Assume that T is a set of trajectories, T fr; ug and let MT be a monoid that recognizes T . The trajectories monoid associated to (M1;M2;MT ), denoted by T (M1;M2;MT ), is by de nition the monoid P(M1 M2 MT ), i.e., T (M1;M2;MT ) = P(M1 M2 MT ). Theorem 3.2 Let L1; L2 be languages, L1; L2 , and let M1;M2 be monoids such that Mi recognizes Li, i = 1; 2. Assume that T is a set of trajectories, T fr; ug and let MT be a monoid that recognizes T . The language L1 T L2 is recognized by the trajectories monoid T (M1;M2;MT ). Proof. Let 'i : ! Mi be morphisms such that ' 1 i (Fi) = Li, for some Fi Mi, i = 1; 2. Assume that 'T : ! MT is a morphism such that ' 1 i (FT ) = T , for some FT MT . De ne the morphism' : ! P(M1 M2 MT ); '(a) = f('1(a); 1; 'T (r)); (1; '2(a); 'T (u))g; where a 2 . It is easy to see that the morphism ' has the following remarkable property: '(x) = f('1( ); '2( ); 'T (t)) j x 2 t ; where ; 2 ; t 2 V g: Consider the set F = fK M1 M2 MT j K \ (F1 F2 FT ) 6= ;g. Using the above property of ', one can easily show that ' 1(F ) = L1 T L2. Hence, the trajectories monoid T (M1;M2;MT ) recognizes the language L1 T L2. Note that ifM1, M2 and MT are nite monoids, then also the trajectories monoid T (M1;M2;MT ) is nite. Hence, Corollary 3.1 If L1, L2 and T are regular languages, then L1 T L2 is a regular language. 6 Consider now the case T = fr; ug . Therefore the operation T is the shu e, . Note that MT is the trivial monoid, i.e., MT = f1g. Hence, the monoid M1 M2 MT is isomorphic with the monoid M1 M2 and, consequently, in this case the trajectories monoid is P(M1 M2). Thus we obtain Corollary 3.2 If L1, L2 are languages, then the language L1 L2 is recognized by the monoid P(M1 M2). Moreover, if L1 and L2 are regular languages, then L1 L2 is a regular language. See [4], page 104, Proposition 1.3, for an entirely di erent proof of the above corollary. Similar results can be obtained for the operations of bi-catenation, literal shu e, balanced literal shu e, and insertion. However, we do not enter this discussion in this paper. 4 Catenation and the Sch utzenberger product Of a special interest is the case of the catenation operation. We quote from Eilenberg, [1], vol. B, page 249: \The catenation product AB of two recognizable subsets A and B of , turns out to be a rather complicated operation when looked at from the point of view of the syntactic invariants. It requires a new operation on semigroups due to Sch utzenberger." The Sch utzenberger product of two monoids M1 and M2, denoted by M13M2, is the submonoid of [P(M1 M2)]2 2 generated by all matrices of the following form: (m1; 1) N 0 (1;m2) ! where mi 2Mi, i = 1; 2, and N M1 M2. The following theorem goes back to Sch utzenberger, [6], see also [1], vol. B, page 250, Theorem 2.1, or [4], page 105, Theorem 1.4. Theorem 4.1 If Mi are monoids such that Mi recognizes Li, i = 1; 2, then the monoid M13M2 recognizes L1L2. By Remark 2.1, for T = r u , T is the catenation operation. We start by considering MT as being the syntactic monoid of T , denoted by Mcat. Since T is a regular language, it follows that Mcat is a nite monoid. Moreover, 7 by a classical method, one can obtain that Mcat = f1; ; ; ; 0g, where 1 is the unit element, 0 is the zero element, 2 = , 2 = , = = and = = = = 0. The morphism 'T : ! MT , de ned by 'T (r) = and 'T (u) = , has the property that ' 1 T (FT ) = T , where FT = f1; ; ; g. From Theorem 3.2 it follows in a straightforward manner: Theorem 4.2 If Mi are monoids such that Mi recognizes Li, i = 1; 2, then the trajectories monoid T (M1;M2;Mcat) recognizes L1L2. In the remainder of this section we establish the interrelation between the trajectories monoid T (M1;M2;Mcat) and the Sch utzenberger product M13M2. Notations. Let ' : ! T (M1;M2;Mcat) be the morphism from the above theorem, with the property that ' 1(F ) = L1L2, for some F T (M1;M2;Mcat). We denote by M1[cat]M2 the monoid '( ), i.e., M1[cat]M2 = '( ). Note that M1[cat]M2 is a submonoid of T (M1;M2;Mcat). Moreover, the monoid M1[cat]M2 recognizes the language L1L2, too. The following theorem shows the relation between the trajectories monoids and the Sch utzenberger product. Theorem 4.3 The monoid M1[cat]M2 is embedded in the monoid M13M2, i.e., there exists an injective morphism, , : M1[cat]M2 !M13M2: Proof. Let m be inM1[cat]M2, m 6= 1. From the de nition of the monoid M1[cat]M2 there exists a word x 2 , such that m = '(x). One can easily verify that x is a nonempty word. The mapping is de ned as (m) = ('1(x); 1) '1(Pref(x)) '2(Suf(x)) 0 (1; '2(x)) ! A long but not di cult proof shows that is well de ned and that, moreover, is an injective morphism. Corollary 4.1 The monoid M1[cat]M2 divides the monoid M13M2. Note that, using the above corollary and Theorem 4.2 we obtain a new and essentially simpler proof of the classical Theorem 4.1. Comment. The morphism from Theorem 4.3 is in general not surjective. Hence, in the nite case, the monoid M1[cat]M2 is smaller than the monoid M13M2. 8 5 Monoids of matrices The Sch utzenberger product M13M2 is a monoid of matrices. Consequently, the following natural problem arises: does exist for every set of trajectories T and for all languages L1 and L2 a monoid of matrices that recognizes the language L1 T L2? The answer to this question is positive and the rst part of this section is dedicated to this problem. The section ends with some Sch utzenberger-like products for some other operations: literal shu e, bi-catenation, insertion, etc. In this section we restrict our attention to regular sets of trajectories. This is not a major restriction mathematically. However, nonregular sets of trajectories lead to in nite matrices. We start with some general facts concerning regular languages and nite automata. Let R be a regular language, R . There exists a nite automaton A = (Q; ; ;Qin; Qfin) such that the language accepted by A, denoted by L(A) is R, i.e., L(A) = R. Note that we do not assume that A is a deterministic automaton. Without loss of generality, we may assume that the set Q of states, is of the form Q = f1; 2; : : : ; ng, for some n 1. Let A be the transition matrix associated to A, i.e., A is an n n matrix A = (dij)1 i;j n such that dij = fx 2 j (i; x) = jg. Note that the entries in A are subsets of . Let kA be the kth power of the matrix A, where k 1. By de nition, 0A is the unit matrix of size n n. Moreover, denote by A the matrix Pk 0 kA. Note that A does exist always. Let in = (ij)1 j n be the row matrix of size 1 n, where ij = 1, if j 2 Qin and ij = 0, otherwise. Similarly, let fin = (fj)1 j n be the column matrix of size n 1, where fj = 1, if j 2 Qfin and fj = 0, otherwise. The following theorem is well known, see [1], [2]. Theorem 5.1 Using the above notations: (i) if kA = ( ij)1 i;j n, then ij = fw 2 j (i; w) = j and jwj = kg, where k 0. (ii) the language accepted by the automaton A is L(A) = in A fin: Assume that T fr; ug is a regular set of trajectories and let AT = (QT ; fr; ug; T ; QT;in; QT;fin) be a nite automaton such that L(AT ) = T . Assume that Q = f1; 2; : : : ; ng and T = (dij)1 i;j n is the transition matrix associated to AT . 9 Let be an alphabet, and let L1, L2 be languages, Li , i = 1; 2. Assume that Li is recognized by the monoidMi, i = 1; 2. Let 'i : !Mi be a morphism such that Li = ' 1 i (Fi), for some Fi Mi, i = 1; 2. Let a be in and let a : fr; ug !M1 M2 be the morphism de ned as: a(r) = ('1(a); 1) and a(u) = (1; '2(a)). For each a 2 , we de ne the matrix a( T ) as the n n matrix obtained from the transition matrix T = (dij)1 i;j n by replacing each dij with a(dij). Let MT (M1;M2) be the monoid generated by the following set of matrices: f a( T ) j a 2 g. Note that MT (M1;M2) is a submonoid of the monoid [P(M1 M2)]n n. The following theorem gives a positive answer to the question considered at the beginning of this section. Theorem 5.2 Let L1; L2 be languages and assume that Li is recognized by the monoidMi, i = 1; 2, and let T fr; ug be a regular set of trajectories. The language L1 T L2 is recognized by a monoid of matricesMT (M1;M2). Proof. Assume that T is accepted by the nite automaton AT = (QT ; fr; ug; T ; QT;in; QT;fin): Consider the morphism ' : !MT (M1;M2), where '(a) = a( T ), for all a 2 . Let F MT (M1;M2) be the following set: F = fB j B 2 MT (M1;M2) such that 0 inB 0fin \ (F1 F2) 6= ;g; where 0 in and 0fin are obtained from in and fin, respectively, by replacing all components that have 1 as their value with the pair (1; 1). Using Theorem 5.1, one can verify that ' 1(F ) = L1 T L2. Therefore, the monoid of matricesMT (M1;M2) recognizes the language L1 T L2. Having a language of the form L = L1 T L2 we proved that L is recognized by the trajectories monoid T (M1;M2;MT ) and also by the monoid of matrices MT (M1;M2). Hence, a natural question occurs: what is the interrelation between these two monoids? Let ' : ! T (M1;M2;MT ) be the morphism such that ' 1(F ) = L1 T L2. Denote by M1[T ]M2 the monoid '( ). Note that M1[T ]M2 is a submonoid of T (M1;M2) and, moreover, M1[T ]M2 recognizes L1 T L2. Theorem 5.3 The monoidM1[T ]M2 is embedded in the monoidMT (M1;M2). 10 Proof. Consider the mapping : M1[T ]M2 ! MT (M1;M2) de ned asfollows: for each m 2 M1[T ]M2, such that m 6= 1, there exists a nonemptyword x 2 such that m = '(x). Assume that x = a1a2 : : : am, whereai 2 , 1 i m. Then, by de nition,(m) = a1( T ) a2( T ) : : : am( T ):A long but not di cult proof shows that is well de ned and, moreover, itcan be proved that is an injective morphism.Now we brie y describe the products corresponding to the operationslisted in Remark 2.1. All these products are similar to the Schutzenbergerproduct. Matrices in the product monoid MT (M1;M2) are referred to asproduct matrices.1. The shu e operation: the transition matrix is T = (fr; ug) and theproduct matrices are of the form (N), where N M1 M2.2. The catenation operation: the transition matrix is:T = r u0 u ! Product matrices: (m1; 1) N0 (1;m2) !where, N M1 M2. Hence, we obtain again the Schutzenbergerproduct.3. The insertion operation: the transition matrix is:T =0B@ r u 00 u r0 0 r 1CA Product matrices:0B@ (m1; 1) N1N20 (1;m2) N300 (n1; 1) 1CAwhere, N1; N2; N3 M1 M2 and m1; n1 2M1, m2 2M2.4. The balanced literal shu e operation: the transition matrix is:T = 0 ru 0 ! Product matrices: m 00 n ! ; 0 m0n0 0 !where, m;n;m0; n0 2M1 M2.5. The literal shu e operation: the transition matrix is:T =0BBB@ 0 r 0 uu 0 r 00 0 r 00 0 0 u 1CCCA Product matrices:0BBB@ m n N1N2p q N3N40 0 (m1; 1) 00 0 0 (1;m2) 1CCCA11 where, N1; N2; N3; N4 M1 M2, m1 2M1, m2 2 M2 and, moreover,m = q = 0; n; p 2M1 M2 or n = p = 0;m; q 2M1 M2.6. The bi-catenation operation: the transition matrix is:T =0BBB@ r u 0 00 u 0 00 0 u r0 0 0 r 1CCCAProduct matrices:0BBB@ (m1; 1) N1000 (1;m2) 0000 (1;m2) N2000 (m1; 1) 1CCCAwhere, N1; N2 M1 M2, m1 2M1, and m2 2M2.7. The anti-catenation operation: the transition matrix is:T = u r0 r ! Product matrices: (1;m2) N0 (m1; 1) !where, N M1 M2.6 ConclusionWe introduced a uniform method to nd monoids that recognize languages ofthe form L1 T L2 and consequently, our results are applicable to many of themost important operations with languages. In general, our method leads tosmaller monoids than previously known methods. Many details concerningthis improvement remain to be clari ed, notably with respect to catenation.Note also that in general the operation T is not associative. The aboveproblems can be formulated for all associative operations T and languagesof the form L1 T L2 T : : : T Ln, n 3.References[1] S. Eilenberg, Automata, Languages and Machines, Academic Press, NewYork, vol. A, 1974, vol. B, 1976.[2] W. Kuich and A. Salomaa, Semirings, Automata, Languages, Springer-Verlag, Berlin, 1986.12 [3] A. Mateescu, G. Rozenberg and A. Salomaa, \Shu e on Trajectories: Syn-tactic Constraints", Technical Report 96-18, University of Leiden, 1996, toappear in TCS.[4] J.E. Pin, Varieties of Formal Languages, North Oxford Academic, 1986.[5] J.E. Pin, \Syntactic Semigroups", in Handbook of Formal Languages, eds.G. Rozenberg and A. Salomaa, Vol. 1, Springer, 1997, 679-746.[6] M.P. Schutzenberger, \On nite monoids having only trivial subgroups",Information and Control, 8, (1965) 190-194.
منابع مشابه
Fundamental Groups, Inverse Sch Utzenberger Automata, and Monoid Presentations
This paper gives decidable conditions for when a nitely generated subgroup of a free group is the fundamental group of a Sch utzenberger automaton corresponding to a monoid presentation of an inverse monoid. Also, generalizations are given to speciic types of inverse monoids as well as to monoids which are \nearly inverse." This result has applications to computing membership for inverse monoid...
متن کاملA Construction on Finite Automata that has Remained Hidden
We show how a construction on matrix representations of two tape automata proposed by Sch utzenberger to prove that rational function are unambiguous can be given a central r^ ole in the theory of relations and functions realized by nite automata, in such a way that the other basic results such as the \Cross-Section Theorem", its dual the theorem of rational uniformisation, or the decomposition...
متن کاملPrediction of Sulfate Scale Depositions in Oilfield Operations Using Arithmetic of LR Fuzzy Numbers
In this study fuzzy arithmetic is presented as a tool to tackle the prediction of the amount of barium, strontium and calcium sulfates scales in oilfield operations. Since the shape of fuzzy numbers’ membership functions is a spread representative of the whole possible values for a special model parameter, fuzzy numbers are able to consider the uncertainties in parameter determinations and thus...
متن کاملShuue Languages Are in P
In this paper we show that shuue languages are contained in one-way-NSPACE(logn) thus in P. We consider the class of shuue languages which emerges from the class of nite languages through regular operations (union, concatenation, Kleene star) and shuue operations (shuue and shuue closure). For every shuue expression E we construct a shuue automaton which accepts the language generated by E and ...
متن کاملShuue on Trajectories: Syntactic Constraints
We introduce and investigate new methods to de ne parallel composition of words and languages. The operation of parallel composition leads to new shu e-like operations de ned by syntactic constraints on the usual shu e operation. The approach is applicable to concurrency, providing a method to de ne parallel composition of processes. It is also applicable to parallel computation. The operations...
متن کامل